import { request } from '../request';

export function getHospitalList(pid: string) {
    return request.get<any>(`/nurse_hospital/nurseHospital/loadTreeChildren?pid=${pid}`, {}, {
        useErrMsg: true
    });
}

export function getHospitalPageList(pageNo: number,pageSize : number) {
    return request.get<any>(`/nurse_hospital/nurseHospital/rootList?pageNo=${pageNo}&pageSize=${pageSize}`, {}, {
        useErrMsg: true
    });
}

export function getHospitalListByArea(area: string) {
    return request.get<any>(`/nurse_hospital/nurseHospital/queryByArea?area=${area}`, {}, {
        useErrMsg: true
    });
}

export function getDeptList(pid: string, hospitalId: string) {
    return request.get<any>(`/nurse_dept/nurseDept/loadTreeChildrenByHisid?pid=${pid}&hospitalId=${hospitalId}`, {}, {
        useErrMsg: true
    });
}

export function getbedList(deptId: string) {
    return request.get<any>(`/nurse_bed/nurseBed/queryByDeptId?deptId=${deptId}`, {}, {
        useErrMsg: true
    });
}

export function getConfig(id: string) {
    return request.get<any>(`/online/cgform/api/getData/11196ec5b55649d6af02028811f0f825?hasQuery=true&hospital_id=${id}&column=id&order=asc`, {}, {
        useErrMsg: true
    });
}